package com.eaoa.uc.dictionary.form;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionMapping;

import com.eaoa.base.EABaseForm;
import com.eaoa.query.pub.PubDatadictionaryQuery;
import com.eaoa.vo.pub.PubDditem;

public class DDictionaryItemForm extends EABaseForm{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private Long itemno;
	private Long ddno;
	private String itemcode;
	private String itemname;
	private String islock;
	private String itemdesc;
	private Long itemorder;
	private Long parentno;
	
	private String parentname;
	
	public PubDditem getVO() {
		PubDditem vo = new PubDditem();
		if(this.ddno!=null)
			vo.setPubDatadictionary(PubDatadictionaryQuery.loadByNo(ddno));
		vo.setItemno(this.itemno);
		vo.setItemcode(this.itemcode);
		vo.setItemname(this.itemname);
		vo.setIslock(this.islock);
		vo.setItemorder(this.itemorder);
		vo.setParentno(this.parentno);
		vo.setItemdesc(this.itemdesc);
		return vo;
	}

	public void reset(ActionMapping mapping, HttpServletRequest request) {
		this.itemorder=new Long(99);
		super.reset(mapping, request);
	}
	

	public void setVO(PubDditem vo){
		if(vo.getPubDatadictionary()!=null)
			this.ddno = vo.getPubDatadictionary().getDdno();
		this.itemno = vo.getItemno();
		this.itemcode = vo.getItemcode();
		this.itemname = vo.getItemname();
		this.islock = vo.getIslock();
		this.itemorder = vo.getItemorder();
		this.parentno = vo.getParentno();
		this.itemdesc = vo.getItemdesc();
	}
	
	public Long getItemno() {
		return itemno;
	}
	public void setItemno(Long itemno) {
		this.itemno = itemno;
	}
	public String getItemcode() {
		return itemcode;
	}
	public void setItemcode(String itemcode) {
		this.itemcode = itemcode;
	}
	public String getItemname() {
		return itemname;
	}
	public void setItemname(String itemname) {
		this.itemname = itemname;
	}
	public String getIslock() {
		return islock;
	}
	public void setIslock(String islock) {
		this.islock = islock;
	}
	public Long getItemorder() {
		return itemorder;
	}
	public void setItemorder(Long itemorder) {
		this.itemorder = itemorder;
	}
	public Long getParentno() {
		return parentno;
	}
	public void setParentno(Long parentno) {
		this.parentno = parentno;
	}

	public String getParentname() {
		return parentname;
	}

	public void setParentname(String parentname) {
		this.parentname = parentname;
	}

	public Long getDdno() {
		return ddno;
	}

	public void setDdno(Long ddno) {
		this.ddno = ddno;
	}

	public String getItemdesc() {
		return itemdesc;
	}

	public void setItemdesc(String itemdesc) {
		this.itemdesc = itemdesc;
	}
	
	
}
